λGTK: a Portable Graphics Layer for Common Music

نویسنده

  • Heinrich Taube
چکیده

λGTK (LAMBDA GTK) is a new, portable graphics layer for implementing graphical user interface (GUI) tools in Common Music [1] (CM), an algorithmic music composition environment that runs in Common Lisp [2] and Scheme [3]. λGTK provides a complete interface to the popular GTK2 [4] graphics libraries and currently supports the development of graphical displays in three different public domain Lisp implementations on two different operating systems. Two full-featured GUI tools for Common Music -a music data visualization tool called Plotter and an executive “front end” window called CMIO -are briefly described as examples of λGTK functionality. A key feature of λGTK is that it is generated programmatically from information parsed from GTK header declarations rather than coded directly by hand. One benefit of this implementation method is that larger (or less inclusive) interfaces can be generated on demand so Lisp applications only need to load bindings for entry points in the GTK libraries that they actually use. Porting λGTK to new Lisp implementations is also much less work than if the layer had been coded by hand, and resolving errors and other porting issues is now a global operation (regenerating the layer) rather than a local one (finding each affected entry and editing it by hand in a text editor). To port λGTK to a new Lisp the developer simply provides “back end” functions to the generating program that translates the system’s intermediate Lisp representation of GTK’s data structures into the appropriate foreign function interface (FFI) code for the new target host. The λGTK layer itself does not depend on anything in Common Music and is available as a separate, free software package released under the Lisp Lesser General Public License (LLGPL). 1. BACKGROUND AND MOTAVATION Common Music is an object-oriented music composition environment. It generates sound by transforming a high-level Lisp representation of musical structure (algorithms, musical event descriptions and other compositional representations) into a variety of protocols for controlling sound synthesis and music score generation. CM has bindings for both Common Lisp and Scheme dialects of Lisp and runs in a variety of Lisp implementations and operating systems. Its highly portable nature, coupled with the fact that neither Common Lisp nor Scheme requires a graphics standard, has made Common Music an essentially text-based system until now. For a certain class of user – someone trained in musical synthesis languages or having prior programming experience – the lack of GUI tools has not presented an undue hardship or problem. But with the publication of Notes from the Metalevel [5] (the author’s book on algorithmic composition) in 2004, new users who have no background in sound synthesis or programming have begun to experiment with algorithmic composition and Common Music. The author decided to use this recent circumstance as the impetus to implement a graphic layer. Since CM is both portable and free, two central requirements of the new graphics code are that (1) the graphics libraries must also be free and (2) the graphical tools that are developed must be usable in more than one public domain Lisp implementation and on more than one operating system. After considering a number of different strategies and options the author decided to base CM’s graphics on Version 2 of the Gimp Tool Kit (GTK2). GTK is a popular, public domain graphics package that runs on multiple platforms, including Linux, OS X and Windows. Its powerful windowing features, free distribution, and stable release cycles make it a good choice to implement source portable graphical interfaces for Common Music. After first attempting to use and adopt a few existing Lisp/GTK interfaces it became apparent that there was no existing software that offered a complete Lisp binding for the complete GTK2 API or that would run on multiple operating systems and Lisp implementations. Mario Momar’s LGTK [6] package was the best candidate system, but, because it is written by hand, it implements only a tiny fraction of the thousands of possible GTK entry points. After considering the size of GTK and the fact that multiple bindings would be required for a portable layer, the author decided that generating Common Music’s graphics layer was the appropriate way to solve both problems.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The Guido Engine A toolbox for music scores rendering

The Guido Music Notation format (GMN) is a general purpose formal language for representing score level music in a platform independent plain text and human readable way. Based on this music representation format, the GuidoLib provides a generic, portable library and API for the graphical rendering of musical scores. This paper gives an introduction to the music notation format and to the Guido...

متن کامل

Hearing Threshold of Korean Adolescents Associated with the Use of Personal Music Players

PURPOSE Hearing loss can lead to a number of disabilities and can reduce quality of life. Noise-induced hearing losses have become more common among adolescents due to increased exposure to personal music players. We, therefore, investigated the use of personal music player among Korean adolescents and the relationship between hearing threshold and usage pattern of portable music players. MAT...

متن کامل

Verovio: A library for Engraving MEI Music Notation into SVG

Rendering symbolic music notation is a common component of many MIR applications, and many tools are available for this task. There is, however, a need for a tool that can natively render the Music Encoding Initiative (MEI) notation encodings that are increasingly used in music research projects. In this paper, we present Verovio, a library and toolkit for rendering MEI. A significant advantage...

متن کامل

The development and evaluation of a portable polyethylene biogas reactor

Several factors can influence the process of biogas production. The type of reactor is one of the key factors that influence biogas production. Therefore, the aim of this study was to construct a portable horizontal polyethylene-based biogas reactor. In addition, the performance of the developed biogas reactor was tested through digestion of cow manure. The experiments were carried out in Mashh...

متن کامل

Towards a Symbolic/Time-Based Music language based on XML

The representation of Symbolic Music Information is the fundamental element of Music Information Processing. Among the several approaches developed in history the markupped one seems to be the most promising. Starting from SMDL, some XML proposals are briefly analyzed. We present our approach of layered representation of Symbolic Music Information based on the space-time organization of events....

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005